//worksheet.js   这里确定表格有多少行 多少列？
import React, { Component } from 'react';
import CommTableView from './commTableView';
export default class WorksheetView extends Component {
    getCommTable(rowNum,colNum,reportId,accountSetId,year,month,orgName,reportDate,reportNo,lister,auditor,way,reportInstanceId) {
        return <CommTableView  rowNum={rowNum} colNum={colNum}
                               reportId={reportId}
                               accountSetId={accountSetId}
                               year={year}
                               month={month}
                               orgName={orgName}
                               reportDate={reportDate}
                               reportNo={reportNo}
                               lister={lister}
                               auditor={auditor}
                               way={way}
                               reportInstanceId={reportInstanceId}
                               onRef={this.workTableViewRef}/>;
    }
    componentDidMount(){
        this.props.onRef(this)  //这个就是把自身传给调用者
    }
    workTableViewRef=(ref)=>{
        this.workTableView = ref
    }

    render() {
        let _reportId=this.props.reportId;
        let _raccountSetId=this.props.accountSetId;
        let _year=this.props.year;
        let _month=this.props.month;
        let _orgName=this.props.orgName;
        let _reportDate=this.props.reportDate;
        let _reportNo=this.props.reportNo;
        let _lister=this.props.lister;
        let _auditor=this.props.auditor;
        let _way=this.props.way;
        let _reportInstanceId=this.props.reportInstanceId;
        return (
              <div className="worksheet">
                  {this.getCommTable(10,5,_reportId,_raccountSetId,_year,_month,_orgName,_reportDate,_reportNo,_lister,_auditor,_way,_reportInstanceId)}
            </div>
        )
    }
}
